package com.yjtravel.u70;

import java.util.Stack;

/**
 * 快照
 * @author weiqi
 * @version 1.0
 * Create by 2024/7/30 9:23
 */
public class SnapshotHolder {

    private final Stack<Snapshot> snapshots = new Stack<>();

    public Snapshot popSnapshot(){
        return snapshots.pop();
    }

    public void pushSnapshot(Snapshot snapshot){
        snapshots.push(snapshot);
    }
}
